<?php


abstract class BaseVwThree extends BaseObject  implements Persistent {


	
	protected static $peer;


	
	protected $id;


	
	protected $member_id;


	
	protected $wronfaure = '';


	
	protected $sgustaberg = '';


	
	protected $esartabarta = '';


	
	protected $latheine = '';


	
	protected $konschtat = '';


	
	protected $tahrongi = '';


	
	protected $vunkerl_s = '';


	
	protected $grauberg_s = '';


	
	protected $fortk_n_s = '';


	
	protected $valkurm = '';


	
	protected $buburimu = '';

	
	protected $alreadyInSave = false;

	
	protected $alreadyInValidation = false;

	
	public function getId()
	{

		return $this->id;
	}

	
	public function getMemberId()
	{

		return $this->member_id;
	}

	
	public function getWronfaure()
	{

		return $this->wronfaure;
	}

	
	public function getSgustaberg()
	{

		return $this->sgustaberg;
	}

	
	public function getEsartabarta()
	{

		return $this->esartabarta;
	}

	
	public function getLatheine()
	{

		return $this->latheine;
	}

	
	public function getKonschtat()
	{

		return $this->konschtat;
	}

	
	public function getTahrongi()
	{

		return $this->tahrongi;
	}

	
	public function getVunkerlS()
	{

		return $this->vunkerl_s;
	}

	
	public function getGraubergS()
	{

		return $this->grauberg_s;
	}

	
	public function getFortkNS()
	{

		return $this->fortk_n_s;
	}

	
	public function getValkurm()
	{

		return $this->valkurm;
	}

	
	public function getBuburimu()
	{

		return $this->buburimu;
	}

	
	public function setId($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->id !== $v) {
			$this->id = $v;
			$this->modifiedColumns[] = VwThreePeer::ID;
		}

	} 
	
	public function setMemberId($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->member_id !== $v) {
			$this->member_id = $v;
			$this->modifiedColumns[] = VwThreePeer::MEMBER_ID;
		}

	} 
	
	public function setWronfaure($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->wronfaure !== $v || $v === '') {
			$this->wronfaure = $v;
			$this->modifiedColumns[] = VwThreePeer::WRONFAURE;
		}

	} 
	
	public function setSgustaberg($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->sgustaberg !== $v || $v === '') {
			$this->sgustaberg = $v;
			$this->modifiedColumns[] = VwThreePeer::SGUSTABERG;
		}

	} 
	
	public function setEsartabarta($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->esartabarta !== $v || $v === '') {
			$this->esartabarta = $v;
			$this->modifiedColumns[] = VwThreePeer::ESARTABARTA;
		}

	} 
	
	public function setLatheine($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->latheine !== $v || $v === '') {
			$this->latheine = $v;
			$this->modifiedColumns[] = VwThreePeer::LATHEINE;
		}

	} 
	
	public function setKonschtat($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->konschtat !== $v || $v === '') {
			$this->konschtat = $v;
			$this->modifiedColumns[] = VwThreePeer::KONSCHTAT;
		}

	} 
	
	public function setTahrongi($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->tahrongi !== $v || $v === '') {
			$this->tahrongi = $v;
			$this->modifiedColumns[] = VwThreePeer::TAHRONGI;
		}

	} 
	
	public function setVunkerlS($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->vunkerl_s !== $v || $v === '') {
			$this->vunkerl_s = $v;
			$this->modifiedColumns[] = VwThreePeer::VUNKERL_S;
		}

	} 
	
	public function setGraubergS($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->grauberg_s !== $v || $v === '') {
			$this->grauberg_s = $v;
			$this->modifiedColumns[] = VwThreePeer::GRAUBERG_S;
		}

	} 
	
	public function setFortkNS($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->fortk_n_s !== $v || $v === '') {
			$this->fortk_n_s = $v;
			$this->modifiedColumns[] = VwThreePeer::FORTK_N_S;
		}

	} 
	
	public function setValkurm($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->valkurm !== $v || $v === '') {
			$this->valkurm = $v;
			$this->modifiedColumns[] = VwThreePeer::VALKURM;
		}

	} 
	
	public function setBuburimu($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->buburimu !== $v || $v === '') {
			$this->buburimu = $v;
			$this->modifiedColumns[] = VwThreePeer::BUBURIMU;
		}

	} 
	
	public function hydrate(ResultSet $rs, $startcol = 1)
	{
		try {

			$this->id = $rs->getInt($startcol + 0);

			$this->member_id = $rs->getInt($startcol + 1);

			$this->wronfaure = $rs->getString($startcol + 2);

			$this->sgustaberg = $rs->getString($startcol + 3);

			$this->esartabarta = $rs->getString($startcol + 4);

			$this->latheine = $rs->getString($startcol + 5);

			$this->konschtat = $rs->getString($startcol + 6);

			$this->tahrongi = $rs->getString($startcol + 7);

			$this->vunkerl_s = $rs->getString($startcol + 8);

			$this->grauberg_s = $rs->getString($startcol + 9);

			$this->fortk_n_s = $rs->getString($startcol + 10);

			$this->valkurm = $rs->getString($startcol + 11);

			$this->buburimu = $rs->getString($startcol + 12);

			$this->resetModified();

			$this->setNew(false);

						return $startcol + 13; 
		} catch (Exception $e) {
			throw new PropelException("Error populating VwThree object", $e);
		}
	}

	
	public function delete($con = null)
	{
		if ($this->isDeleted()) {
			throw new PropelException("This object has already been deleted.");
		}

		if ($con === null) {
			$con = Propel::getConnection(VwThreePeer::DATABASE_NAME);
		}

		try {
			$con->begin();
			VwThreePeer::doDelete($this, $con);
			$this->setDeleted(true);
			$con->commit();
		} catch (PropelException $e) {
			$con->rollback();
			throw $e;
		}
	}

	
	public function save($con = null)
	{
		if ($this->isDeleted()) {
			throw new PropelException("You cannot save an object that has been deleted.");
		}

		if ($con === null) {
			$con = Propel::getConnection(VwThreePeer::DATABASE_NAME);
		}

		try {
			$con->begin();
			$affectedRows = $this->doSave($con);
			$con->commit();
			return $affectedRows;
		} catch (PropelException $e) {
			$con->rollback();
			throw $e;
		}
	}

	
	protected function doSave($con)
	{
		$affectedRows = 0; 		if (!$this->alreadyInSave) {
			$this->alreadyInSave = true;


						if ($this->isModified()) {
				if ($this->isNew()) {
					$pk = VwThreePeer::doInsert($this, $con);
					$affectedRows += 1; 										 										 
					$this->setId($pk);  
					$this->setNew(false);
				} else {
					$affectedRows += VwThreePeer::doUpdate($this, $con);
				}
				$this->resetModified(); 			}

			$this->alreadyInSave = false;
		}
		return $affectedRows;
	} 
	
	protected $validationFailures = array();

	
	public function getValidationFailures()
	{
		return $this->validationFailures;
	}

	
	public function validate($columns = null)
	{
		$res = $this->doValidate($columns);
		if ($res === true) {
			$this->validationFailures = array();
			return true;
		} else {
			$this->validationFailures = $res;
			return false;
		}
	}

	
	protected function doValidate($columns = null)
	{
		if (!$this->alreadyInValidation) {
			$this->alreadyInValidation = true;
			$retval = null;

			$failureMap = array();


			if (($retval = VwThreePeer::doValidate($this, $columns)) !== true) {
				$failureMap = array_merge($failureMap, $retval);
			}



			$this->alreadyInValidation = false;
		}

		return (!empty($failureMap) ? $failureMap : true);
	}

	
	public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
	{
		$pos = VwThreePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
		return $this->getByPosition($pos);
	}

	
	public function getByPosition($pos)
	{
		switch($pos) {
			case 0:
				return $this->getId();
				break;
			case 1:
				return $this->getMemberId();
				break;
			case 2:
				return $this->getWronfaure();
				break;
			case 3:
				return $this->getSgustaberg();
				break;
			case 4:
				return $this->getEsartabarta();
				break;
			case 5:
				return $this->getLatheine();
				break;
			case 6:
				return $this->getKonschtat();
				break;
			case 7:
				return $this->getTahrongi();
				break;
			case 8:
				return $this->getVunkerlS();
				break;
			case 9:
				return $this->getGraubergS();
				break;
			case 10:
				return $this->getFortkNS();
				break;
			case 11:
				return $this->getValkurm();
				break;
			case 12:
				return $this->getBuburimu();
				break;
			default:
				return null;
				break;
		} 	}

	
	public function toArray($keyType = BasePeer::TYPE_PHPNAME)
	{
		$keys = VwThreePeer::getFieldNames($keyType);
		$result = array(
			$keys[0] => $this->getId(),
			$keys[1] => $this->getMemberId(),
			$keys[2] => $this->getWronfaure(),
			$keys[3] => $this->getSgustaberg(),
			$keys[4] => $this->getEsartabarta(),
			$keys[5] => $this->getLatheine(),
			$keys[6] => $this->getKonschtat(),
			$keys[7] => $this->getTahrongi(),
			$keys[8] => $this->getVunkerlS(),
			$keys[9] => $this->getGraubergS(),
			$keys[10] => $this->getFortkNS(),
			$keys[11] => $this->getValkurm(),
			$keys[12] => $this->getBuburimu(),
		);
		return $result;
	}

	
	public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
	{
		$pos = VwThreePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
		return $this->setByPosition($pos, $value);
	}

	
	public function setByPosition($pos, $value)
	{
		switch($pos) {
			case 0:
				$this->setId($value);
				break;
			case 1:
				$this->setMemberId($value);
				break;
			case 2:
				$this->setWronfaure($value);
				break;
			case 3:
				$this->setSgustaberg($value);
				break;
			case 4:
				$this->setEsartabarta($value);
				break;
			case 5:
				$this->setLatheine($value);
				break;
			case 6:
				$this->setKonschtat($value);
				break;
			case 7:
				$this->setTahrongi($value);
				break;
			case 8:
				$this->setVunkerlS($value);
				break;
			case 9:
				$this->setGraubergS($value);
				break;
			case 10:
				$this->setFortkNS($value);
				break;
			case 11:
				$this->setValkurm($value);
				break;
			case 12:
				$this->setBuburimu($value);
				break;
		} 	}

	
	public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
	{
		$keys = VwThreePeer::getFieldNames($keyType);

		if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
		if (array_key_exists($keys[1], $arr)) $this->setMemberId($arr[$keys[1]]);
		if (array_key_exists($keys[2], $arr)) $this->setWronfaure($arr[$keys[2]]);
		if (array_key_exists($keys[3], $arr)) $this->setSgustaberg($arr[$keys[3]]);
		if (array_key_exists($keys[4], $arr)) $this->setEsartabarta($arr[$keys[4]]);
		if (array_key_exists($keys[5], $arr)) $this->setLatheine($arr[$keys[5]]);
		if (array_key_exists($keys[6], $arr)) $this->setKonschtat($arr[$keys[6]]);
		if (array_key_exists($keys[7], $arr)) $this->setTahrongi($arr[$keys[7]]);
		if (array_key_exists($keys[8], $arr)) $this->setVunkerlS($arr[$keys[8]]);
		if (array_key_exists($keys[9], $arr)) $this->setGraubergS($arr[$keys[9]]);
		if (array_key_exists($keys[10], $arr)) $this->setFortkNS($arr[$keys[10]]);
		if (array_key_exists($keys[11], $arr)) $this->setValkurm($arr[$keys[11]]);
		if (array_key_exists($keys[12], $arr)) $this->setBuburimu($arr[$keys[12]]);
	}

	
	public function buildCriteria()
	{
		$criteria = new Criteria(VwThreePeer::DATABASE_NAME);

		if ($this->isColumnModified(VwThreePeer::ID)) $criteria->add(VwThreePeer::ID, $this->id);
		if ($this->isColumnModified(VwThreePeer::MEMBER_ID)) $criteria->add(VwThreePeer::MEMBER_ID, $this->member_id);
		if ($this->isColumnModified(VwThreePeer::WRONFAURE)) $criteria->add(VwThreePeer::WRONFAURE, $this->wronfaure);
		if ($this->isColumnModified(VwThreePeer::SGUSTABERG)) $criteria->add(VwThreePeer::SGUSTABERG, $this->sgustaberg);
		if ($this->isColumnModified(VwThreePeer::ESARTABARTA)) $criteria->add(VwThreePeer::ESARTABARTA, $this->esartabarta);
		if ($this->isColumnModified(VwThreePeer::LATHEINE)) $criteria->add(VwThreePeer::LATHEINE, $this->latheine);
		if ($this->isColumnModified(VwThreePeer::KONSCHTAT)) $criteria->add(VwThreePeer::KONSCHTAT, $this->konschtat);
		if ($this->isColumnModified(VwThreePeer::TAHRONGI)) $criteria->add(VwThreePeer::TAHRONGI, $this->tahrongi);
		if ($this->isColumnModified(VwThreePeer::VUNKERL_S)) $criteria->add(VwThreePeer::VUNKERL_S, $this->vunkerl_s);
		if ($this->isColumnModified(VwThreePeer::GRAUBERG_S)) $criteria->add(VwThreePeer::GRAUBERG_S, $this->grauberg_s);
		if ($this->isColumnModified(VwThreePeer::FORTK_N_S)) $criteria->add(VwThreePeer::FORTK_N_S, $this->fortk_n_s);
		if ($this->isColumnModified(VwThreePeer::VALKURM)) $criteria->add(VwThreePeer::VALKURM, $this->valkurm);
		if ($this->isColumnModified(VwThreePeer::BUBURIMU)) $criteria->add(VwThreePeer::BUBURIMU, $this->buburimu);

		return $criteria;
	}

	
	public function buildPkeyCriteria()
	{
		$criteria = new Criteria(VwThreePeer::DATABASE_NAME);

		$criteria->add(VwThreePeer::ID, $this->id);

		return $criteria;
	}

	
	public function getPrimaryKey()
	{
		return $this->getId();
	}

	
	public function setPrimaryKey($key)
	{
		$this->setId($key);
	}

	
	public function copyInto($copyObj, $deepCopy = false)
	{

		$copyObj->setMemberId($this->member_id);

		$copyObj->setWronfaure($this->wronfaure);

		$copyObj->setSgustaberg($this->sgustaberg);

		$copyObj->setEsartabarta($this->esartabarta);

		$copyObj->setLatheine($this->latheine);

		$copyObj->setKonschtat($this->konschtat);

		$copyObj->setTahrongi($this->tahrongi);

		$copyObj->setVunkerlS($this->vunkerl_s);

		$copyObj->setGraubergS($this->grauberg_s);

		$copyObj->setFortkNS($this->fortk_n_s);

		$copyObj->setValkurm($this->valkurm);

		$copyObj->setBuburimu($this->buburimu);


		$copyObj->setNew(true);

		$copyObj->setId(NULL); 
	}

	
	public function copy($deepCopy = false)
	{
				$clazz = get_class($this);
		$copyObj = new $clazz();
		$this->copyInto($copyObj, $deepCopy);
		return $copyObj;
	}

	
	public function getPeer()
	{
		if (self::$peer === null) {
			self::$peer = new VwThreePeer();
		}
		return self::$peer;
	}

} 